The present invention relates to an automatic focus adjustment device for automatically adjusting a focus lens to an in-focus position with respect to an object, an image sensing apparatus with the automatic focus adjustment device, and a focus adjustment method.
In the field of video cameras as typical image sensing apparatuses, a technique for recording still images is receiving a lot of attention in addition to recording of moving images. In order to record a high-quality still image, a video camera to which a so-called electronic flash device (light projector) can be attached has been proposed.
Some of such electronic flash devices comprise an auxiliary light-emitting unit or function used when an auto-focus (AF: automatic focus adjustment) function operates before image sensing, in addition to a main light-emitting unit. In a video camera which uses an electronic flash device having such auxiliary light-emitting unit, the auxiliary light-emitting unit is turned on before still image recording, a focus lens is moved to an in-focus position by the AF function, and the main light-emitting unit is turned on. Then, a still image is recorded.
Since the principal objective of the AF function of a video camera or the like is normally to sense moving images, the following TVAF (Television-AF) scheme is popularly used. That is, the sharpness of the picture sensed by an image sensing element such as a CCD (charge coupled device) is detected using a video signal obtained by photoelectrically converting an object image obtained via an optical system by the image sensing element, and the position of the focus lens is controlled to maximize the sharpness, thus attaining real-time focus adjustment.
Upon evaluating the sharpness, it is a common practice to use the level of a high-frequency component (to be referred to as a focus evaluation value hereinafter) of a video signal extracted by a bandpass filter for an arbitrary frequency band. For example, when an image of an object such as a person or the like is sensed, a focus evaluation value Y becomes larger as the position of the focus lens approaches an in-focus position, and a point P where that level becomes maximum is detected as the in-focus position of the focus lens, as shown in FIG. 12.
A general AF function executed in the above-mentioned video camera will be described in detail below with reference to the flow chart shown in FIG. 13.
The focus evaluation value is calculated while moving the focus lens by a predetermined small amount (step S402). It is then checked based on the moving direction of the focus lens and changes in level of the calculated focus evaluation value if the focus lens is currently at an in-focus position or out-of-focus position (step S403).
If it is determined in step S403 that the focus lens is currently at the in-focus position, the driving of the focus lens is stopped, and the control advances to restart monitoring processing in step S409 and the subsequent steps.
That is, the focus evaluation value corresponding to the current in-focus position is stored in a memory (focus evaluation value level memory) (step S409), and restart discrimination is executed (step S410).
In the restart discrimination, it is checked if the current focus evaluation value has drifted from that stored in the memory in step S409 upon focus adjustment. For example, if the current focus evaluation value has changed by a predetermined level or more from that stored in the memory, it is determined that the object has changed due to movement of the object, panning, and the like, and restart is required. On the other hand, if the current focus evaluation value has undergone a change less than the predetermined level, it is determined that the object has not moved, and restart is not required.
It is then checked based on the result of such restart discrimination (step S410) if restart is required (step S411). If it is determined that restart is required, the flow returns to step S402 to execute micro driving, in-focus discrimination, and direction discrimination of the focus lens in turn. On the other hand, if it is determined that restart is not required, the current position of the focus lens is maintained, and the flow returns to step S410 to execute the restart monitoring processing again.
If it is determined in step S403 that the focus lens is currently not at the in-focus position, the direction of the in-focus position of the focus lens is discriminated on the basis of the direction of micro driving of the lens done in step S402, and changes in level of the focus evaluation value at that time (step S404). If the direction can be discriminated, hill climbing, i.e., driving of the focus lens to an in-focus position in steps S405 and S406 (to be described later) is executed. If the direction cannot be discriminated, the flow returns to step S402 to repeat the subsequent processing steps.
Note that “hill climbing” is named since the focus lens is moved to be, as an in-focus point, a peak position of a “hill-like” characteristic curve of the focus evaluation value.
If the direction can be discriminated in step S404, the focus lens is driven by hill climbing in that discriminated direction (step S405), and it is checked if the focus lens position has overshot the in-focus point, i.e., an apex (P in FIG. 12) of the evaluation value (step S406).
If it is determined in step S406 that the focus lens position has not overshot the apex of the evaluation value yet, the flow returns to step S405 to continue hill climbing. Otherwise, operation for returning the focus lens position to the apex is done (step S407). It is then checked if the focus lens position has reached the apex (step S408). After that, step S407 repeats itself until the focus lens position reaches the apex.
During operation for returning the focus lens position to the apex in steps S407 and S408, the object may change due to, e.g., panning or the like of the video camera. For this reason, if the focus lens position has reached the apex (“YES” in step S408), the flow returns to step S402 to execute micro driving again, so as to check if the current position is on a correct apex, i.e., the in-focus point.
By repeating steps S401 to S412 mentioned above, the focus lens can be driven to always maintain an in-focus state.
However, with the above-mentioned AF function, if the detected focus evaluation value has changed, the focus lens moves upon driving and is offset from the in-focus position.
That is, after the electronic flash device (light-emitting unit) is turned on and the focus lens position is adjusted to the in-focus position by the AF function, if the electronic flash device is turned off while the AF function is in operation, the focus evaluation value changes due to changes in illuminance of the object. For this reason, the focus lens moves from the current position by focus adjustment of the AF function. As a result, an out-of-focus state is formed upon recording a still image, and a low-quality still image is recorded by the video camera.